{% extends "ojbase.html" %}
{% block title %}NEU django OJ{% endblock %}
{% block middle %}
{% for contest in contests %}
        <table class="table table-hover">
<tr>
    <th>Contest id</th>
    <th>Contest Name</th>
    <th>Start time</th>
    <th>End time</th>
    <th>Owner</th>
    <th>is Public</th>
</tr>
<tr>
    <td>{{ contest.id }}</td>
    <td><a href="/contest/{{contest.id}}" >{{contest.title}}</a></td>
    <td>{{contest.start|date:"Y-m-d H:i:s"}}</td>
    <td>{{contest.end|date:"Y-m-d H:i:s"}}</td>
    <td>{{contest.admin.username}}</td>
    <td>{% ifequal contest.isPublic 0 %}Public{% else %}{% ifequal contest.isPublic 1 %}password{% else %}private{% endifequal %}{% endifequal %}</td>
</tr>
    </table>

{% endfor %}
{% endblock %}
